<?php if (!isset($_GET['Month'])) {
		$ScdTime = date("Y-m");
		} else { 
		$ScdTime = date("Y").'-'.$_GET['Month'];
		}
		$ConsultTime = split("-",$ScdTime);
?>
<table width="100%"  border="0" cellpadding="4" cellspacing="1"> 
    <tr bgcolor="#006699"> 
      <td><span style="font-weight: bold; color: #FFFFFF;">AcÇ&otilde;es</span></td> 
      <td><span style="font-weight: bold; color: #FFFFFF;"><?php
	 if (!isset($_GET['ACT'])) {
	  echo 'Detalhes do Dia';
	  } elseif(isset($_GET['ACT']) && $_GET['ACT'] == 'VCTS') {
	  echo '<form accept-charset="utf-8" action="?" method="get" name="ConsultTimes" runat="server">';
	  echo '<input name="ACT" value="VCTS" type="hidden">';
	  echo 'Resumo Mensal';
		scdconsult($ScdTime,'ConsultTimes');
	  } elseif (isset($_GET['ACT']) && $_GET['ACT'] == 'EVE') { 
	  echo '<form accept-charset="utf-8" action="?" method="get" name="ConsultTimes" runat="server">';
	  echo '<input name="ACT" value="EVE" type="hidden">';
	  echo 'Eventos';
	 	scdconsult($ScdTime,'ConsultTimes');
	  } elseif (isset($_GET['ACT'])) {
	  echo 'Pedidos';
	  } ?></span></td> 
    </tr> 
    <tr> 
      <td width="20%" rowspan="3" valign="top" bgcolor="#F2F2F2"> <table width="100%"  border="0" cellspacing="1" cellpadding="3"> 
          <tr> 
            <td><span style="font-weight: bold">Consultas</span></td> 
          </tr> 
          <tr> 
            <td bgcolor="#DFDEE7"><a href="<?php echo $_SERVER['PHP_SELF'];?>">Informação do Dia</a></td> 
          </tr> 
          <tr> 
            <td bgcolor="#DFDEE7"><a href="<?php echo $_SERVER['PHP_SELF'];?>?ACT=VCTS">Resumo Mensal </a></td> 
          </tr> 
          <tr> 
            <td bgcolor="#DFDEE7"><a href="<?php echo $_SERVER['PHP_SELF'];?>?ACT=EVE">Eventos</a></td> 
          </tr> 
          <tr> 
            <td><span style="font-weight: bold">Pedidos</span></td> 
          </tr> 
          <tr> 
            <td bgcolor="#DFDEE7"><a href="?ACT=VCREQ">Pedido de Férias</a></td> 
          </tr> 
          <tr> 
            <td bgcolor="#DFDEE7"><a href="?ACT=HDREQ">Pedido de Falta</a></td> 
          </tr> 
        </table> 
        <?php
		$ScdCalend = "SELECT DAY(EventTime) AS Event FROM timeclock_delays 
						WHERE main_user_ref = {$_SESSION['UtID']}
						AND EventTime";
		scdttable($ScdCalend,$ConsultTime); ?></td> 
      <td valign="top" bgcolor="#F2F2F2">
	  <?php 
	  if (!isset($_GET['ACT'])) {
	  	include($GLOBALS['PAD']."Modules/TimeClock/Lib/resumday.php");
	  } elseif(isset($_GET['ACT']) && $_GET['ACT'] == 'VCTS') {
	  	include($GLOBALS['PAD']."Modules/TimeClock/Lib/resummon.php");
		echo '</form>';
	  } elseif (isset($_GET['ACT'])) { 
 	 	include($GLOBALS['PAD']."Modules/TimeClock/Lib/resevents.php");
		echo '</form>';
	  } ?>
	  </td> 
    </tr> 
</table>
